package com.tbit.uqbike.object.pojo.vo;

import com.tbit.uqbike.object.pojo.ParamDate;
import com.tbit.uqbike.webmanager.util.csv.annotations.Csv;
import com.tbit.uqbike.webmanager.util.csv.annotations.Sum;

import java.math.BigDecimal;

/**
 * 礼品卡收支
 *
 * @Author:yanlun
 * @DATE: 2022/11/18
 */

public class AccountDayStatGiftCardDetailVO extends ParamDate {

    private Integer accountId;
    /**
     * 区域
     */
    @Csv(name = "区域")
    private String accountName;
    /**
     * 日期
     */
    @Csv(name = "日期")
    private String date;
    /**
     * 用户充值赠送金额
     */
    @Sum
    @Csv(name = "用户充值赠送金额")
    private BigDecimal userRechargeIncome;
    /**
     * 用户充值赠送笔数
     */
    @Sum
    @Csv(name = "用户充值赠送笔数")
    private Long userRechargeIncomeCount;
    /**
     * 手工充值金额
     */
    @Sum
    @Csv(name = "手工充值金额")
    private BigDecimal manualRechargeIncome;
    /**
     * 手工充值笔数
     */
    @Sum
    @Csv(name = "手工充值笔数")
    private Long manualRechargeIncomeCount;
    /**
     * 兑换金额
     */
    @Sum
    @Csv(name = "兑换金额")
    private BigDecimal exchangeIncome;
    /**
     * 兑换笔数
     */
    @Sum
    @Csv(name = "兑换笔数")
    private Long exchangeIncomeCount;
    /**
     * 用户退款扣除金额
     */
    @Sum
    @Csv(name = "用户退款扣除金额")
    private BigDecimal userRefundExpend;
    /**
     * 用户退款扣除笔数
     */
    @Sum
    @Csv(name = "用户退款扣除笔数")
    private Long userRefundExpendCount;
    /**
     * 手工扣除金额
     */
    @Sum
    @Csv(name = "手工扣除金额")
    private BigDecimal manualSubtractExpend;
    /**
     * 手工扣除笔数
     */
    @Sum
    @Csv(name = "手工扣除笔数")
    private Long manualSubtractExpendCount;
    /**
     * 用户退款扣除金额
     */
    @Sum
    @Csv(name = "用户退款扣除金额")
    private BigDecimal rideExpend;
    /**
     * 用户退款扣除笔数
     */
    @Sum
    @Csv(name = "用户退款扣除笔数")
    private Long rideExpendCount;
    /**
     * 期初
     */
    @Csv(name = "期初礼品卡总金额")
    private BigDecimal termStart;
    /**
     * 期末
     */
    @Csv(name = "期末礼品卡总金额")
    private BigDecimal termEnd;

    public AccountDayStatGiftCardDetailVO() {
        fillData();
    }

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public BigDecimal getUserRechargeIncome() {
        return userRechargeIncome == null ? null : userRechargeIncome.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setUserRechargeIncome(BigDecimal userRechargeIncome) {
        this.userRechargeIncome = userRechargeIncome;
    }

    public Long getUserRechargeIncomeCount() {
        return userRechargeIncomeCount;
    }

    public void setUserRechargeIncomeCount(Long userRechargeIncomeCount) {
        this.userRechargeIncomeCount = userRechargeIncomeCount;
    }

    public BigDecimal getManualRechargeIncome() {
        return manualRechargeIncome == null ? null : manualRechargeIncome.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setManualRechargeIncome(BigDecimal manualRechargeIncome) {
        this.manualRechargeIncome = manualRechargeIncome;
    }

    public Long getManualRechargeIncomeCount() {
        return manualRechargeIncomeCount;
    }

    public void setManualRechargeIncomeCount(Long manualRechargeIncomeCount) {
        this.manualRechargeIncomeCount = manualRechargeIncomeCount;
    }

    public BigDecimal getExchangeIncome() {
        return exchangeIncome == null ? null : exchangeIncome.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setExchangeIncome(BigDecimal exchangeIncome) {
        this.exchangeIncome = exchangeIncome;
    }

    public Long getExchangeIncomeCount() {
        return exchangeIncomeCount;
    }

    public void setExchangeIncomeCount(Long exchangeIncomeCount) {
        this.exchangeIncomeCount = exchangeIncomeCount;
    }

    public BigDecimal getUserRefundExpend() {
        return userRefundExpend == null ? null : userRefundExpend.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setUserRefundExpend(BigDecimal userRefundExpend) {
        this.userRefundExpend = userRefundExpend;
    }

    public Long getUserRefundExpendCount() {
        return userRefundExpendCount;
    }

    public void setUserRefundExpendCount(Long userRefundExpendCount) {
        this.userRefundExpendCount = userRefundExpendCount;
    }

    public BigDecimal getManualSubtractExpend() {
        return manualSubtractExpend == null ? null : manualSubtractExpend.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setManualSubtractExpend(BigDecimal manualSubtractExpend) {
        this.manualSubtractExpend = manualSubtractExpend;
    }

    public Long getManualSubtractExpendCount() {
        return manualSubtractExpendCount;
    }

    public void setManualSubtractExpendCount(Long manualSubtractExpendCount) {
        this.manualSubtractExpendCount = manualSubtractExpendCount;
    }

    public BigDecimal getRideExpend() {
        return rideExpend == null ? null : rideExpend.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setRideExpend(BigDecimal rideExpend) {
        this.rideExpend = rideExpend;
    }

    public Long getRideExpendCount() {
        return rideExpendCount;
    }

    public void setRideExpendCount(Long rideExpendCount) {
        this.rideExpendCount = rideExpendCount;
    }

    public BigDecimal getTermStart() {
        return termStart == null ? null : termStart.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setTermStart(BigDecimal termStart) {
        this.termStart = termStart;
    }

    public BigDecimal getTermEnd() {
        return termEnd == null ? null : termEnd.setScale(2, BigDecimal.ROUND_HALF_UP);
    }

    public void setTermEnd(BigDecimal termEnd) {
        this.termEnd = termEnd;
    }

    public void fillData() {
        BigDecimal bigDecimal = new BigDecimal(0);
        this.userRechargeIncome = this.userRechargeIncome == null ? bigDecimal : this.userRechargeIncome;
        this.userRechargeIncomeCount = this.userRechargeIncomeCount == null ? 0L : this.userRechargeIncomeCount;
        this.manualRechargeIncome = this.manualRechargeIncome == null ? bigDecimal : this.manualRechargeIncome;
        this.manualRechargeIncomeCount = this.manualRechargeIncomeCount == null ? 0L : this.manualRechargeIncomeCount;
        this.exchangeIncome = this.exchangeIncome == null ? bigDecimal : this.exchangeIncome;
        this.exchangeIncomeCount = this.exchangeIncomeCount == null ? 0L : this.exchangeIncomeCount;
        this.userRefundExpend = this.userRefundExpend == null ? bigDecimal : this.userRefundExpend;
        this.userRefundExpendCount = this.userRefundExpendCount == null ? 0L : this.userRefundExpendCount;
        this.manualSubtractExpend = this.manualSubtractExpend == null ? bigDecimal : this.manualSubtractExpend;
        this.manualSubtractExpendCount = this.manualSubtractExpendCount == null ? 0L : this.manualSubtractExpendCount;
        this.rideExpend = this.rideExpend == null ? bigDecimal : this.rideExpend;
        this.rideExpendCount = this.rideExpendCount == null ? 0L : this.rideExpendCount;
        this.termStart = this.termStart == null ? bigDecimal : this.termStart;
        this.termEnd = this.termEnd == null ? bigDecimal : this.termEnd;
    }
}
